package web;
import java.io.*;
import java.sql.*;
import java.util.ArrayList;
public class RoomInfoList{

	//rooms table column
	private ArrayList<Integer> node_idList = new ArrayList<Integer>();
	private ArrayList<Integer> node_onList = new ArrayList<Integer>();
	private ArrayList<String> dateList = new ArrayList<String>(); 
	private ArrayList<String> roomnameList = new ArrayList<String>(); 
	private ArrayList<Float> temperatureList = new ArrayList<Float>(); 
	private ArrayList<Float> humidityList = new ArrayList<Float>();
	private ArrayList<Float> co2List = new ArrayList<Float>(); 
	private ArrayList<Integer> co2ledList = new ArrayList<Integer>(); 
	private ArrayList<Integer> co2alramList = new ArrayList<Integer>(); 
	private ArrayList<Integer> temperledList = new ArrayList<Integer>();
	private ArrayList<Integer> warmupList = new ArrayList<Integer>();
	//last info
	private boolean lastInfo = false;
	
	public RoomInfoList(){
		
	}
	
	//set method
	public void setNode_id(int index, Integer node_id){
		this.node_idList.add(index, node_id);
	}
	
	public void setNode_on(int index, Integer node_on){
		this.node_onList.add(index, node_on);
	}
	
	public void setDate(int index, String date){
		this.dateList.add(index, date);
	}
	
	public void setRoomname(int index, String roomname){
		this.roomnameList.add(index, roomname);
	}
	
	public void setTemperature(int index, Float temperature){
		this.temperatureList.add(index, temperature);
	}
	
	public void setHumidity(int index, Float humidity){
		this.humidityList.add(index, humidity);
	}
	
	public void setCO2(int index, Float co2){
		this.co2List.add(index, co2);
	}
	
	public void setCO2led(int index, Integer co2led){
		this.co2ledList.add(index, co2led);
	}
	
	public void setCO2alram(int index, Integer co2alram){
		this.co2alramList.add(index, co2alram);
	}
	
	public void setTemperled(int index, Integer temperled){
		this.temperledList.add(index, temperled);
	}
	
	public void setWarmup(int index, Integer warmup){
		this.warmupList.add(index, warmup);
	}
	
	public void setLastInfo(boolean lastInfo){
		this.lastInfo = lastInfo;
	}
	//get method
	public Integer[] getNode_id(){
		return node_idList.toArray(new Integer[node_idList.size()]);
	}
	
	public Integer[] getNode_on(){
		return node_onList.toArray(new Integer[node_onList.size()]);
	}
	
	public String[] getDate(){
		return dateList.toArray(new String[dateList.size()]);
	}
	
	public String[] getRoomname(){
		return roomnameList.toArray(new String[roomnameList.size()]);
	}
	
	public Float[] getTemperature(){
		return temperatureList.toArray(new Float[temperatureList.size()]);
	}
	
	public Float[] getHumidity(){
		return humidityList.toArray(new Float[humidityList.size()]);
	}
	
	public Float[] getCO2(){
		return co2List.toArray(new Float[co2List.size()]);
	}
	
	public Integer[] getCO2led(){
		return co2ledList.toArray(new Integer[co2ledList.size()]);
	}
	
	public Integer[] getCO2alram(){
		return co2alramList.toArray(new Integer[co2alramList.size()]);
	}
	
	public Integer[] getTemperled(){
		return temperledList.toArray(new Integer[temperledList.size()]);
	}
	
	public Integer[] getWarmup(){
		return warmupList.toArray(new Integer[warmupList.size()]);
	}
	
	public boolean isLastInfo()
	{
		return lastInfo;
	}
	
	public int getListSize()
	{
		return node_idList.size();
	
	}
	
	
	
	
}